In [13]: matplotlib.font_manager.findSystemFonts(fontpaths=None, fontext='ttf') Out[13]: ['/usr/share/fonts/truetype/dejavu/DejaVuSerif.ttf', '/usr/local/share/fonts/STKAITI.TTF', # font is here '/usr/share/fonts/truetype/dejavu/DejaVuSerif-Bold.ttf', '/usr/local/share/fonts/NotoSansSC-Regular.otf', '/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf', '/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf', '/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf', '/usr/share/fonts/truetype/dejavu/DejaVuSansMono-Bold.ttf']
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
import matplotlib.pyplot as plt In [6]: plt.rcParams["font.sans-serif"] ## this is definded in my '~/.config/matplotlib/matplotlibrc' Out[6]: ['STKaiti', # is here 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', 'sans-serif']
ok…testing
1 2 3 4 5 6 7 8 9 10 11 12 13
In [7]: matplotlib.font_manager.get_fontconfig_fonts() <ipython-input-7-b1c4039c0e25>:1: MatplotlibDeprecationWarning: The get_fontconfig_fonts function was deprecated in Matplotlib 3.5and will be removed two minor releases later. matplotlib.font_manager.get_fontconfig_fonts() Out[7]: ['/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf', '/usr/local/share/fonts/NotoSansSC-Regular.otf', '/usr/local/share/fonts/STKAITI.TTF', # here '/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf', '/usr/share/fonts/truetype/dejavu/DejaVuSansMono-Bold.ttf', '/usr/share/fonts/truetype/dejavu/DejaVuSerif-Bold.ttf', '/usr/share/fonts/truetype/dejavu/DejaVuSerif.ttf', '/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf']
In [10]: matplotlib.font_manager.findfont("STKaiti", rebuild_if_missing=True) findfont: Font family ['STKaiti'] not found. Falling back to DejaVu Sans. Out[10]: '/usr/local/lib/python3.8/site-packages/matplotlib/mpl-data/fonts/ttf/DejaVuSans.ttf'
In [14]: matplotlib.font_manager.findfont("STIXSizeTwoSym", rebuild_if_missing=True) Out[14]: '/usr/local/lib/python3.8/site-packages/matplotlib/mpl-data/fonts/ttf/STIXSizTwoSymReg.ttf'
In [19]: matplotlib.font_manager.findfont("STKaiti", directory="/usr/local/share/fonts/",rebuild_if_missing=True) findfont: Font family ['STKaiti'] not found. Falling back to DejaVu Sans. --------------------------------------------------------------------------- ValueError Traceback (most recent call last) Input In [19], in <cell line: 1>() ----> 1 matplotlib.font_manager.findfont("STKaiti", directory="/usr/local/share/fonts/",rebuild_if_missing=True)
File /usr/local/lib/python3.8/site-packages/matplotlib/font_manager.py:1307, in FontManager.findfont(self, prop, fontext, directory, fallback_to_default, rebuild_if_missing) 1301# Pass the relevant rcParams (and the font manager, as `self`) to 1302# _findfont_cached so to prevent using a stale cache entry after an 1303# rcParam was changed. 1304 rc_params = tuple(tuple(rcParams[key]) for key in [ 1305"font.serif", "font.sans-serif", "font.cursive", "font.fantasy", 1306"font.monospace"]) -> 1307return self._findfont_cached( 1308 prop, fontext, directory, fallback_to_default, rebuild_if_missing, 1309 rc_params)
File /usr/local/lib/python3.8/site-packages/matplotlib/font_manager.py:1361, in FontManager._findfont_cached(self, prop, fontext, directory, fallback_to_default, rebuild_if_missing, rc_params) 1359 default_prop = prop.copy() 1360 default_prop.set_family(self.defaultFamily[fontext]) -> 1361return self.findfont(default_prop, fontext, directory, 1362 fallback_to_default=False) 1363else: 1364raise ValueError(f"Failed to find font {prop}, and fallback " 1365f"to the default font was disabled")
File /usr/local/lib/python3.8/site-packages/matplotlib/font_manager.py:1307, in FontManager.findfont(self, prop, fontext, directory, fallback_to_default, rebuild_if_missing) 1301# Pass the relevant rcParams (and the font manager, as `self`) to 1302# _findfont_cached so to prevent using a stale cache entry after an 1303# rcParam was changed. 1304 rc_params = tuple(tuple(rcParams[key]) for key in [ 1305"font.serif", "font.sans-serif", "font.cursive", "font.fantasy", 1306"font.monospace"]) -> 1307return self._findfont_cached( 1308 prop, fontext, directory, fallback_to_default, rebuild_if_missing, 1309 rc_params)
File /usr/local/lib/python3.8/site-packages/matplotlib/font_manager.py:1364, in FontManager._findfont_cached(self, prop, fontext, directory, fallback_to_default, rebuild_if_missing, rc_params) 1361return self.findfont(default_prop, fontext, directory, 1362 fallback_to_default=False) 1363else: -> 1364raise ValueError(f"Failed to find font {prop}, and fallback " 1365f"to the default font was disabled") 1366else: 1367 _log.debug('findfont: Matching %s to %s (%r) with score of %f.', 1368 prop, best_font.name, best_font.fname, best_score)
ValueError: Failed to find font DejaVu Sans:style=normal:variant=normal:weight=normal:stretch=normal:size=16.0, and fallback to the default font was disabled
In Oracle, the data dictionary represents all case insensitive identifier names using UPPERCASE text. SQLAlchemy on the other hand considers an all-lower case identifier name to be case insensitive. The Oracle dialect converts all case insensitive identifiers to and from those two formats during schema level communication, such as reflection of tables and indexes. Using an UPPERCASE name on the SQLAlchemy side indicates a case sensitive identifier, and SQLAlchemy will quote the name - this will cause mismatches against data dictionary data received from Oracle, so unless identifier names have been truly created as case sensitive (i.e. using quoted names), all lowercase names should be used on the SQLAlchemy side.
if name_upper == name_lower: # name has no upper/lower conversion, e.g. non-european characters. # return unchanged return name elif name_upper == name andnot ( self.identifier_preparer._requires_quotes )(name_lower): # name is all uppercase and doesn't require quoting; normalize # to all lower case return name_lower elif name_lower == name: # name is all lower case, which if denormalized means we need to # force quoting on it return quoted_name(name, quote=True) else: # name is mixed case, means it will be quoted in SQL when used # later, no normalizes return name
defdenormalize_name(self, name): if name isNone: returnNone
if name_upper == name_lower: # name has no upper/lower conversion, e.g. non-european characters. # return unchanged return name elif name_lower == name andnot ( self.identifier_preparer._requires_quotes )(name_lower): name = name_upper return name
def_requires_quotes(self, value): """Return True if the given identifier requires quoting.""" lc_value = value.lower() uc_value = value.upper() return ( lc_value in self.reserved_words or value[0] in self.illegal_initial_characters ornot self.legal_characters.match(util.text_type(value)) or ((lc_value != value) and (uc_value != value)) # change here, allow all uppercaes )
Would you liketo accept secure desktop inputfrom Steam?.
Solved. The methods are as follows.
Suppose that you have PC A and B, your game is installed on A, and
you wanna play on B. May be B is in your office and A is at your
home.
On B, RDP into A.
Launch steam on both A and B. (In B, you should see "Stream"
button on the game you are to play)
Click "stream" button on B. (It will fail because you will see
the boring dialog box)
Press "Tab" key and choose the window of your RDP, so now you can
see that on A, your game has been launched.
On A, launch cmd.exe as administrator.
type "qwinsta" and press enter, no quotes are required.
You should see the active sessions list on your A. One of them is
your RDP session, with your username followed. One of them named
"concole" is what your steam on B attempted to login but failed. Please
remember the session ID of the former. (The ID should be an
integer.)
Type "tscon SESSIONID /password:PWD /dest:console" in the cmd on
A. Change SESSIONID to the number you remembered, and PWD to your normal
windows user password, leave the rest intact. Press enter. (This command
will attach the RDP session to the console session)
Once you pressed enter, your RDP to A will immediately
disconnect. Now, back to B, on your steam game page, click "Stop"
button, then click "connect" button, you are ready to remote play
:)
Go to Device Manager( in System) -> Select your network adapter and click right button -> Select Properties -> >Click Allow this device to wake the computer and Only allow a magic packet to wake the computer.
What I've checked was these: -Windows LAN adapters settings: All OK with all Magic Packets checked, and power saving unchecked. -Windows Power Saving settings: Full Performance (LAN/PCI/Related goes to standby) -BIOS settings: EuP Disabled, PCIE Wake Enabled
What I've found: -Normal Windows Shutdown: When performing a normal windows shutdown from "Shutdown" button, LAN card turns >completely off (stops blinking/reporting to router) -PC Monitor App: When sending from my phone the shutdown command from this app. the PC turns off the same way than >pressing the button BUT LAN card keeps alive (blinking and reporting to router), allowing me to wake up from my >network or through internet.
So it seems the shutdown button has some different command that kills my card when I press it to turn of my PC.
UPDATE: Think I've found it... is because Windows "Fast Boot" - http://support.microsoft.com/kb/2776718/en-us
/** * @param args * @throws SQLException */ public static void main(String[] args) throws SQLException { try { Class.forName(driverName); } catch (ClassNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); System.exit(1); } //replace "hive" here with the nameof the user the queries should run as Connection con = DriverManager.getConnection("jdbc:hive2://localhost:10000/default", "hive", ""); Statement stmt = con.createStatement(); String tableName = "testHiveDriverTable"; stmt.execute("drop table if exists " + tableName); stmt.execute("create table " + tableName + " (key int, value string)"); // showtables String sql = "show tables '" + tableName + "'"; System.out.println("Running: " + sql); ResultSet res = stmt.executeQuery(sql); if (res.next()) { System.out.println(res.getString(1)); } // describe table sql = "describe " + tableName; System.out.println("Running: " + sql); res = stmt.executeQuery(sql); while (res.next()) { System.out.println(res.getString(1) + "\t" + res.getString(2)); }
// load data intotable // NOTE: filepath has to be localto the hive server // NOTE: /tmp/a.txt is a ctrl-A separated file with two fields per line String filepath = "/tmp/a.txt"; sql = "load data local inpath '" + filepath + "' into table " + tableName; System.out.println("Running: " + sql); stmt.execute(sql);
// select * query sql = "select * from " + tableName; System.out.println("Running: " + sql); res = stmt.executeQuery(sql); while (res.next()) { System.out.println(String.valueOf(res.getInt(1)) + "\t" + res.getString(2)); }
// regular hive query sql = "select count(1) from " + tableName; System.out.println("Running: " + sql); res = stmt.executeQuery(sql); while (res.next()) { System.out.println(res.getString(1)); }